package com.srcptit.java.training.kienbd.bt1;
public class Muc1_Bai6_STN {
	static int stn(int n)
	{
            int m, sodao=0;
            m=n;
            while(m>0)
            {
                sodao=sodao*10+m%10;
		m=m/10;
            }
            if( sodao==n )		return 1;
            else			return 0;
	}
	static void kt()
	{
            int dem=0;
            System.out.println("Cac so thuan nghich co 6 chu so : ");
            for(int i=100000 ; i<=999999 ; i++)
            if(stn(i)==1)
            {
            	System.out.println(+i);
		dem++;
            }
            System.out.println("Co tat ca " +dem+ " so.");
	}
	public static void main(String args[])
        {
            kt();
	}
}
